﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Data.Linq;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Microsoft.Silverlight.Testing;
using HCMServices.DAO;

namespace HCMServices.Tests
{
    /// <summary>
    /// Application class of HCMServices
    /// </summary>
    public partial class App : Application
    {        
        /// <summary>
        /// Constructor for the Application object.
        /// </summary>
        public App()
        {            
            // Standard Silverlight initialization
            InitializeComponent();

            string connectString = "Data Source = isostore:/Database.sdf";
            using (MyDataContext db = new MyDataContext(connectString))
            {
                if (db.DatabaseExists() == false)
                {
                    DataHelper.MoveReferenceDatabase();
                }               
            }

            this.RootVisual = UnitTestSystem.CreateTestPage();
        }
    }
}